#ifndef CLIENTSOCKET_H
#define CLIENTSOCKET_H
#include "ui_widget.h"
#include <QTcpSocket>
#include "QHostAddress"
#include "threadsendgps.h"
class ClientSocket : public QTcpSocket,public  Ui::Widget
{
    Q_OBJECT
public:
    explicit ClientSocket(QObject *parent = 0);

    QByteArray DataReceived;
signals:
    void error(const QString error);
    void success();
public slots:
    void slotDisconnected();
    void slotConnect();
    void HostFound();
    void Error(QAbstractSocket::SocketError socketerror);

public:
    void SetIp(QString ip);
    void SetPort(int pt);
    void SendGps(QString gps);
    QHostAddress address;
    quint16 port;
    bool Server_exist;
    //ThSendGps *Th_SendGps;
};

#endif // CLIENTSOCKET_H
